package com.bwie.es;

import bwie.pojo.Image;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.List;


@Data
@Document(indexName = "es_list")
public class GoodsEs {
    @Id
    @Field(type = FieldType.Integer)
    private Integer id;

    @Field(type = FieldType.Text)
    private String goodsName;

    @Field(type = FieldType.Text)
    private String goodsFirst;

    @Field(type = FieldType.Text)
    private String goodsSecond;

    @Field(type = FieldType.Text)
    private String goodsIntro;

    @Field(type = FieldType.Text)
    private String goodsVolume;

    @Field(type = FieldType.Double)
    private double goodsPrice;

    @Field(type = FieldType.Integer)
    private Integer userId;

    @Field(type = FieldType.Text)
    private String onename;

    @Field(type = FieldType.Text)
    private String twoname;

    @Field(type = FieldType.Nested)
    private List<Image> imageList;
}
